package com.zysf.library_boot.controller;

import com.zysf.library_boot.entity.NavMenu;
import com.zysf.library_boot.service.NavMenuService;
import com.zysf.library_boot.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/navMenu")
public class NavMenuController {
    @Autowired
    NavMenuService navMenuService;
    @RequestMapping("/list")
    public Result listNavMenu(){
        List<NavMenu> navMenuList = navMenuService.list();
        return Result.ok(navMenuList);
    }
}
